home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / serien / purity / nr.42 / includes3v1 / includes3v1.lha / Intuition / cgHooks.i next >
Text File  |  1994-12-04  |  2KB  |  66 lines

  1. { cghooks.i }
  2.  
  3. {$I   "Include:Exec/Types.i"}
  4.  
  5. {
  6.  * Package of information passed to custom and 'boopsi'
  7.  * gadget "hook" functions.  This structure is READ ONLY.
  8.  }
  9. Type
  10.    gi_Pens_Struct = Record
  11.     DetailPen, BlockPen : Byte;
  12.    END;
  13.  
  14.    GadgetInfo = Record
  15.     gi_Screen                   : Address;       { ScreenPtr }
  16.     gi_Window                   : Address;       { null for screen gadgets }    { WindowPtr }
  17.     gi_Requester                : Address;       { null IF not GTYP_REQGADGET } { RequesterPtr }
  18.  
  19.     { rendering information:
  20.      * don't use these without cloning/locking.
  21.      * Official way is to call ObtainRPort()
  22.      }
  23.     gi_RastPort                 : Address;       { RastPortPtr }
  24.     gi_Layer                    : Address;       { LayerPtr }
  25.  
  26.     { copy of dimensions of screen/window/g00/req(/group)
  27.      * that gadget resides in.  Left/Top of this box is
  28.      * offset from window mouse coordinates to gadget coordinates
  29.      *          screen gadgets:                 0,0 (from screen coords)
  30.      *  window gadgets (no g00):        0,0
  31.      *  GTYP_GZZGADGETs (borderlayer):          0,0
  32.      *  GZZ innerlayer gadget:          borderleft, bordertop
  33.      *  Requester gadgets:              reqleft, reqtop
  34.      }
  35.     gi_Domain                   : Address;   { IBoxPtr }
  36.  
  37.     gi_Pens                     : gi_Pens_Struct;
  38.  
  39.     { the Detail and Block pens in gi_DrInfo->dri_Pens[] are
  40.      * for the screen.  Use the above for window-sensitive
  41.      * colors.
  42.      }
  43.     gi_DrInfo                   : Address;  { DrawInfoPtr }
  44.  
  45.     { reserved space: this structure is extensible
  46.      * anyway, but using these saves some recompilation
  47.      }
  48.     gi_Reserved                 : Array[0..5] of Integer;
  49.    END;
  50.    GadgetInfoPtr = ^GadgetInfo;
  51.  
  52. {** system private data structure for now **}
  53. { prop gadget extra info       }
  54.    PGX = Record
  55.     pgx_Container : Address;     { IBoxPtr }
  56.     pgx_NewKnob   : Address;     { IBoxPtr }
  57.    END;
  58.  
  59. { this casts MutualExclude for easy assignment of a hook
  60.  * pointer to the unused MutualExclude field of a custom gadget
  61.  }
  62.  
  63.                      { g : GadgetPtr }
  64. FUNCTION CUSTOM_HOOK(g : Address) : Integer;
  65.  External;
  66.